<html>
<head>
<link rel="stylesheet" href="tabs.css" type="text/css" />
<link rel="stylesheet" href="grey_tabs.css" type="text/css" />
<script type="text/javascript" src="../../os3jslib/liwe.js" type="text/javascript"></script>
<script type="text/javascript" src="../../os3jslib/object_enh.js" type="text/javascript"></script>
<script type="text/javascript" src="../../os3jslib/array_enh.js" type="text/javascript"></script>
<script type="text/javascript" src="../../os3jslib/string_enh.js" type="text/javascript"></script>
<script type="text/javascript" src="tabs.js" type="text/javascript"></script>
<script type="text/javascript">
var tabs;

function init ()
{
	tabs = new OS3Tabs.instance ( 'tabs' );
	tabs.create_html = true;

	tabs.add ( 'G1 - Main tab', 'g1_tab1', '<h1>Tab 1</h1>' );
	tabs.add ( 'G1 - Second tab', 'g1_tab2', '<h1>Tab 2</h1>' );
	tabs.add ( 'G1 - Third tab', 'g1_tab3' );

	tabs.set_group ( 'second' );
	tabs.add ( 'G2 - Main tab', 'g2_tab1', 'Hello World!' );
	tabs.add ( 'G2 - Second tab', 'g2_tab2' );

	tabs.set_group ( 'third' );
	tabs.add ( 'TERZO', 'g2_tab3' );

	tabs.set_group ( 'second' );
	tabs.add ( 'AGGIUNTO', 'g2_tab1' );

	// tabs.set_event ( 'btn_down', function ( a, b, c, d ) { alert ( a ); } );

	tabs.tab_width = "120px";
	tabs.render ( 'my_tabs' );
}

function change_title()
{
	tabs.set_tab_title ( 'New Title!', 'default', 0 );
}

function block_event ()
{
	if ( tabs._is_btn_down_blocked )
	{
		tabs.block_event ( 'btn_down', false );
		tabs._is_btn_down_blocked = false;
	} else {
		tabs.block_event ( 'btn_down' );
		tabs._is_btn_down_blocked = true;
	}
}
</script>

</head>
 <body onload="init()">

<div id="my_tabs"></div>


</body>
</html>
